package com.dv.driverless.service.impl;

import java.util.List;
import com.dv.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dv.driverless.mapper.InfoExceptionMapper;
import com.dv.driverless.domain.InfoException;
import com.dv.driverless.service.IInfoExceptionService;

/**
 * 异常信息Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-06
 */
@Service
public class InfoExceptionServiceImpl implements IInfoExceptionService
{
    @Autowired
    private InfoExceptionMapper infoExceptionMapper;

    /**
     * 查询异常信息
     *
     * @param id 异常信息主键
     * @return 异常信息
     */
    @Override
    public InfoException selectInfoExceptionById(Long id)
    {
        return infoExceptionMapper.selectInfoExceptionById(id);
    }

    /**
     * 查询异常信息列表
     *
     * @param infoException 异常信息
     * @return 异常信息
     */
    @Override
    public List<InfoException> selectInfoExceptionList(InfoException infoException)
    {
        return infoExceptionMapper.selectInfoExceptionList(infoException);
    }

    /**
     * 新增异常信息
     *
     * @param infoException 异常信息
     * @return 结果
     */
    @Override
    public int insertInfoException(InfoException infoException)
    {
        infoException.setCreateTime(DateUtils.getNowDate());
        return infoExceptionMapper.insertInfoException(infoException);
    }

    /**
     * 修改异常信息
     *
     * @param infoException 异常信息
     * @return 结果
     */
    @Override
    public int updateInfoException(InfoException infoException)
    {
        return infoExceptionMapper.updateInfoException(infoException);
    }

    /**
     * 批量删除异常信息
     *
     * @param ids 需要删除的异常信息主键
     * @return 结果
     */
    @Override
    public int deleteInfoExceptionByIds(Long[] ids)
    {
        return infoExceptionMapper.deleteInfoExceptionByIds(ids);
    }

    /**
     * 删除异常信息信息
     *
     * @param id 异常信息主键
     * @return 结果
     */
    @Override
    public int deleteInfoExceptionById(Long id)
    {
        return infoExceptionMapper.deleteInfoExceptionById(id);
    }
}
